<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="id" lang="id">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javaScript" src="scripts/jquery.1.7.js"></script>
<script type="text/javaScript"  src="./scripts/jquery.progressbar.js"></script>
<script>
	jQuery.noConflict();
	jQuery(document).ready(function() {
		<%
			int totalTakenUser = (Integer) request.getAttribute("totalTakenUser");
			int totalAnswer = (Integer) request.getAttribute("totalAnswer");
			String colors[] = new String[]{"progressbg_green.gif",
				"progressbg_orange.gif", "progressbg_red.gif", "progressbg_yellow.gif"};
			for(int i = 0; i < totalAnswer; i ++){
				String div = "div" + i;
				int imageIndex = i % colors.length;
				int value = (Integer) request.getAttribute(div);
				String tmp = 
							"jQuery('#" + div + "').progressBar(" + value + ", {" +
								"max: " + totalTakenUser + "," + 
								"barImage : 'images/" + colors[imageIndex] + "'" + 
							"});\n";
				out.write(tmp);
			}
		%> 
	}); 
</script>
</head>
<body>
	<html:form action="/surveySummaryDetail.do">
	<html:hidden property="id" />
	<div class="outerbox">
		<div class="mainHeading">
			<div
				style="width: 360px; height: 32px; background: url(images/formTitleBackground.png) no-repeat top right; font-color: #CC0000;">
				<h2 class="formTitle">SURVEY SUMMARY DETAIL</h2>
			</div>
		</div> 
	</div>
<!-- 	style="background-color: #F4F8FC" -->
	 <div class="outerbox">
	 	<div style="padding-left: 200px;padding-right: 200px;min-height: 500px;">
		 	<div id="surveyId">
		 		<br/>
 				<center><h3><bean:write filter="false" name="surveySummaryDetail" property="topic"/></h3></center>
		 		<center>
		 			Created By:&nbsp;
		 			<b><bean:write name="surveySummaryDetail" property="lastModifiedUser"/></b>
		 			&nbsp;&nbsp;&nbsp;&nbsp;
		 			Unit:&nbsp;
		 			<b><bean:write name="surveySummaryDetail" property="subunit"/></b>
		 			&nbsp;&nbsp;&nbsp;&nbsp;
		 			Open Date:&nbsp;
		 			<b><bean:write name="surveySummaryDetail" property="startDateStr"/></b>
		 			&nbsp;&nbsp;&nbsp;&nbsp;
		 			Expiry Date:&nbsp;
		 			<b><bean:write name="surveySummaryDetail" property="endDateStr"/></b>
		 		</center>
		 		<br/><bean:write filter="false" name="surveySummaryDetail" property="html"/>
		 	</div>
	 	</div>
	 </div>
	</html:form>
</body>
</html>